package com.ch.dream.asynctask;

import org.json.JSONObject;

import android.content.Context;

import com.ch.dream.base.BaseRequestAsyncTask;
import com.ch.dream.bean.LongstoryBean;
import com.ch.dream.common.CommonRequestUrl;
import com.ch.dream.net.MyHttpAPI;

public class GetLongStoryRequestAsyncTask extends BaseRequestAsyncTask{

	private MyHttpAPI myHttpAPI = new MyHttpAPI(CommonRequestUrl.GETLONGSTORY);
	
	public GetLongStoryRequestAsyncTask(Context context, RequestServerListener requestServerListener) {
		super(context, requestServerListener);
	}

	@Override
	protected Object doInBackground(Object... params) {
		
		JSONObject jsonObject = null;
		try{
			LongstoryBean bean =(LongstoryBean)params[0];
			JSONObject param = bean.getJsonObject();
			param.put("longStoryId", 0);
			jsonObject = myHttpAPI.requestForJson(param);
		}catch (Exception e) {
			e.printStackTrace();
			return jsonObject;
		}
		
		return jsonObject;
	}
}
